import {defHttp} from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";

const { createConfirm } = useMessage();

enum Api {
  list = '/auditCenter/caishuiTaskSettle/list',
  itemList = '/auditCenter/caishuiTaskSettle/itemList',
  statusOne='/auditCenter/caishuiTaskSettle/status',
  exportXls = '/auditCenter/caishuiTaskSettle/exportXls',
  caishuiTaskSettleItemList = '/auditCenter/caishuiTaskSettle/queryCaishuiTaskSettleItemByMainId',
}
/**
 * 导出api
 * @param params
 */
export const getExportUrl = Api.exportXls;

/**
 * 列表接口
 * @param params
 */
export const list = (params) => defHttp.get({url: Api.list, params});
/**
 * 详情列表接口
 * @param params
 */
export const itemList = (params) => defHttp.get({url: Api.itemList, params});

/**
 * 审批接口
 * @param params
 */
export const statusOne = (params) => {
  return defHttp.get({url: Api.statusOne, params}, {isTransformResponse:false});
}

/**
 * 子表列表接口
 * @param params
 */
export const taskSettleItemList = (params) => defHttp.get({url: Api.caishuiTaskSettleItemList, params},{isTransformResponse:false});
